﻿<%@ Page Language="C#" MasterPageFile="~/Shared/ContentMaster.master" AutoEventWireup="true"
    CodeFile="ListBox.aspx.cs" Inherits="Demos_Tree_ListBox" %>

<asp:Content ID="C1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="CPH1" runat="Server">
    <telerik:RadCodeBlock runat="server" ID="block1">
        <script>
            function nodeClicking(sender, args) {
                var comboBox = $find("<%= RadComboBoxTreeList.ClientID %>");

                var node = args.get_node();

                comboBox.set_text(node.get_text());
                comboBox.set_value(node.get_value());

                comboBox.trackChanges();
                comboBox.get_items().getItem(0).set_text(node.get_text());
                comboBox.get_items().getItem(0).set_value(node.get_value());
                comboBox.commitChanges();
                comboBox.hideDropDown();
            }
        </script>
    </telerik:RadCodeBlock>
    <telerik:RadAjaxPanel runat="server" ID="panel1" LoadingPanelID="MasterRadAjaxLoadingPanel1">
        <div class="pad5">
            <fieldset>
                <legend class="icon-find icon-text">信息检索</legend>
                <telerik:RadComboBox Width="350" runat="server" ID="RadComboBoxTreeList" Label="查找节点："
                    EmptyMessage="选择节点">
                    <ItemTemplate>
                        <telerik:RadTreeView runat="server" ID="RadTreeView1" OnClientNodeClicking="nodeClicking" />
                    </ItemTemplate>
                    <Items>
                        <telerik:RadComboBoxItem Text="" />
                    </Items>
                </telerik:RadComboBox>
                <telerik:RadButton Icon-PrimaryIconCssClass="icon-search" ID="Button1" runat="server"
                    OnClick="Button1_Click" Text="搜索" />
            </fieldset>
        </div>
        <div class="pad5">
            <div class="fl-left">
                启用:<br />
                <telerik:RadListBox runat="server" ID="RadListBoxSource" TransferToID="RadListBoxDest"
                    Width="180" />
            </div>
            <div class="fl-left">
                禁用:<br />
                <telerik:RadListBox ID="RadListBoxDest" runat="server" Width="180" />
            </div>
        </div>
    </telerik:RadAjaxPanel>
</asp:Content>
